package main

import (
	"fmt"
	"mall_2.0/config"
	"mall_2.0/pkg/utils/log"
	"mall_2.0/respository/cache"
	"mall_2.0/respository/db/dao"
	"mall_2.0/routes"
)

func main() {
	loading()
	r := routes.NewRouter()
	_ = r.Run(config.Config.System.HttpPort)
	fmt.Println("启动配置成功。。。")
}

func loading() {
	config.InitConfig()
	log.InitLog()
	cache.InitCache() // Redis
	dao.InitMySQL()   // MySQL
}
